﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="UserList.aspx.cs"
    Inherits="UserList_cs" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>组织架构管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager runat="server" AutoSizePanelID="RegionPanel1" />
    <ext:RegionPanel runat="server" ID="RegionPanel1" ShowBorder="false">
        <Regions>
            <ext:Region ID="Region2" Split="true" EnableSplitTip="true" CollapseMode="Default"
                Width="300px" Margins="0 0 0 0" ShowHeader="true" Title="部门" EnableLargeHeader="true"
                Icon="Outline" EnableCollapse="true" Layout="Fit" Position="Left" runat="server">
                <Items>
                    <ext:Tree ID="Tree1" OnNodeExpand="Tree1_NodeExpand" AutoWidth="true" Height="300px"
                        ShowHeader="false" OnNodeCommand="Tree1_NodeCommand" AutoLeafIdentification="false"
                        runat="server" EnableSingleExpand="true" AutoScroll="true">
                        <Toolbars>
                            <ext:Toolbar Position="Bottom" runat="server">
                                <Items>
                                    <ext:Button ID="btnAddMenu" Icon="TableAdd" Text="新建部门" runat="server" OnClick="btnAddMenu_Click">
                                    </ext:Button>
                                    <ext:Button ID="btnEditMenu" Icon="TableEdit" Text="编辑部门" runat="server" OnClick="btnEditMenu_Click">
                                    </ext:Button>
                                    <ext:Button ID="btnDelMenu" ConfirmText="此操作不可逆，请确认" Icon="TableEdit" Text="删除部门"
                                        runat="server" OnClick="btnDelMenu_Click">
                                    </ext:Button>
                                    <ext:ToolbarFill runat="server">
                                    </ext:ToolbarFill>
                                    <ext:Button ID="btnReloadMenu" Icon="Reload" Text="刷新" runat="server" OnClick="btnReloadMenu_Click">
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </Toolbars>
                    </ext:Tree>
                </Items>
            </ext:Region>
            <ext:Region ID="mainRegion" ShowHeader="false" Layout="Fit" Margins="0 0 0 0" Position="Center"
                runat="server">
                <Items>
                    <ext:Panel ID="Panel1" Title="组织架构管理" runat="server" AutoHeight="true" BodyPadding="5px"
                        ShowBorder="True" ShowHeader="false" EnableBackgroundColor="true" AutoScroll="true">
                        <Items>
                            <ext:Form ID="Form5" ShowBorder="False" BodyPadding="5px" EnableBackgroundColor="true"
                                ShowHeader="False" runat="server">
                                <Rows>
                                    <ext:FormRow>
                                        <Items>
                                           
                                            <ext:TwinTriggerBox runat="server" EmptyText="输入要搜索的关键词" ShowLabel="false" ID="ttbSearch"
                                                ShowTrigger1="false" OnTrigger1Click="ttbSearch_Trigger1Click" OnTrigger2Click="ttbSearch_Trigger2Click"
                                                Trigger1Icon="Clear" Trigger2Icon="Search">
                                            </ext:TwinTriggerBox>
                                        </Items>
                                    </ext:FormRow>
                                </Rows>
                            </ext:Form>
                            <ext:Grid ID="Grid1" Title="组织架构列表" ShowBorder="true" ShowHeader="true" AutoHeight="true"
                                runat="server" EnableCheckBoxSelect="true" DataKeyNames="Id" EnableRowNumber="True"
                                EnableTextSelection="true" AllowPaging="true" ForceFitAllTime="true" IsDatabasePaging="true"
                                OnPageIndexChange="Grid1_PageIndexChange">
                                <Toolbars>
                                    <ext:Toolbar ID="Toolbar1" runat="server">
                                        <Items>
                                            <ext:Button ID="btnNew" Text="新增员工" Icon="Add" EnablePostBack="false" runat="server">
                                            </ext:Button>
                                            <ext:Button ID="btnDelete" Text="删除员工" Icon="Delete" ConfirmText="此项操作不可逆，继续请点确定"
                                                OnClick="btnDelete_Click" runat="server">
                                            </ext:Button>
                                            <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                                            </ext:ToolbarFill>
                                            <ext:Button ID="btnExcel" Text="导出Excel" Icon="PageExcel" EnableAjax="false" DisableControlBeforePostBack="False"
                                                OnClick="btnExcel_click" runat="server">
                                            </ext:Button>
                                        </Items>
                                    </ext:Toolbar>
                                </Toolbars>
                                <Columns>
                                    <ext:BoundField DataField="UName" DataFormatString="{0}" ExpandUnusedSpace="True"
                                        HeaderText="姓名" />
                                    <ext:BoundField DataField="UID" DataFormatString="{0}" ExpandUnusedSpace="True" HeaderText="账户" />
                                    <ext:BoundField DataField="Paixu" DataFormatString="{0}" ExpandUnusedSpace="True"
                                        HeaderText="排序" />
                                    <ext:WindowField ColumnID="myWindowField" Width="60px" WindowID="Window1" HeaderText="编辑"
                                        Icon="Pencil" ToolTip="编辑" DataTextFormatString="{0}" DataIFrameUrlFields="Id"
                                        DataIFrameUrlFormatString="UserListaction.aspx?id={0}" DataWindowTitleField="UName"
                                        DataWindowTitleFormatString="编辑 - {0}" />
                                </Columns>
                            </ext:Grid>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Region>
        </Regions>
    </ext:RegionPanel>
    <ext:Window ID="Window1" Title="编辑" Hidden="true" EnableIFrame="true" runat="server"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" IFrameUrl="about:blank"
        EnableMaximize="true" EnableResize="true" OnClose="Window1_Close" Target="Top"
        IsModal="True" Width="750px" Height="450px">
    </ext:Window>
    </form>
</body>
</html>
